TK!2
=v
#1
:n

:s
b
:c
  Connection between these variables'
#2
:n

:s
b
:c
  associated lists and the similarly
#3
:n

:s
b
:c
  named lists for data input (ending
#4
:n

:s
b
:c
  in "_In") is established in the rule
#5
:n

:s
b
:c
  function 'assign'.  Each variable's
#6
:n

:s
b
:c
  "_In" list has the same Calculation
#7
:n

:s
b
:c
  and Display units as its directly
#8
:n

:s
b
:c
  associated list.
#9
:n
PRICE
:s
b
:u
$
:d
$
:c
Purchase Price of asset
:a
PRICE
#10
:n
DOWNPAY
:s
b
:u
$
:d
$
:c
Down Payment
:a
DOWNPAY
#11
:n
DP%
:s
b
:u
1
:d
%
:c
Down Payment Percentage
:a
DP%
#12
:n
LOAN
:s
b
:u
$
:d
$
:c
Beginning Balance of Loan
:a
LOAN
#13
:n
TERM
:s
b
:u
mo
:d
yr
:c
Term of Loan
:a
TERM
#14
:n
RATE
:s
b
:u
1/mo
:d
%/yr
:c
Nominal Interest Rate on Loan
:a
RATE
:f
.00833333333333333
#15
:n
PAYMENT
:s
b
:u
$/mo
:d
$/mo
:c
Amount of Periodic Loan Payment
:a
PAYMENT
#16
:n
TOTPAY
:s
b
:u
$
:d
$
:c
Total of Payments Made over Loan Term
:a
TOTPAY
#17
:n
TOTINT
:s
b
:u
$
:d
$
:c
Total Interest Paid over Loan Term
:a
TOTINT
#18
:n
DUMMY
:v
0
:s
i
:c
Dummy Variable for Multi-Case Analysis
:a
DUMMY
#19
:n

:s
b
:c
 (enables list solving over all
#20
:n

:s
b
:c
 instances with  F10  instead of /LB)
=u
#1
:f
yr
:m
12
:t
mo
#2
:f
1
:m
100
:t
%
#3
:f
1/mo
:m
100
:t
%/mo
#4
:f
%/mo
:m
12
:t
%/yr
=l
#1
:n
PRICE
:d
$
:u
$
:v
12000
12000
15000
15000
15000
15000
15000
9995
72500
11500
E
#2
:n
DOWNPAY
:d
$
:u
$
:v
2000
1800
2000
2000
2250
4559.94964871887
3750
2000
7250
1150
E
#3
:n
DP%
:d
%
:u
1
:v
.166666666666667
.15
.133333333333333
.133333333333333
.15
.303996643247924
.25
.200100050025013
.1
.1
E
#4
:n
LOAN
:d
$
:u
$
:v
10000
10200
13000
13000
12750
10440.0503512811
11250
7995
65250
10350
E
#5
:n
TERM
:d
yr
:u
mo
:v
48
48
68.4416837330059
60
60
48
48
44.5493828564194
360
48
E
#6
:n
RATE
:d
%/yr
:u
1/mo
:v
.00833333333333333
.00833333333333333
.00833333333333333
.00481684569714875
.00549079866098214
.00583333333333333
.00583333333333333
.00325
.00908333333333333
.0025
E
#7
:n
PAYMENT
:d
$/mo
:u
$/mo
:v
253.625834347473
258.698351034422
250
250
250
250
269.395252452482
193.06
616.465586616621
229.090284339379
E
#8
:n
TOTPAY
:d
$
:u
$
:v
12174.0400486787
12417.5208496523
17110.4209332515
15000
15000
12000
12930.9721177191
8600.70385426032
221927.611181983
10996.3336482902
E
#9
:n
TOTINT
:d
$
:u
$
:v
2174.04004867868
2217.52084965225
4110.42093325148
2000
2250
1559.94964871887
1680.97211771912
605.70385426032
156677.611181983
646.333648290176
E
#10
:n
DUMMY
:c
 
:v
0
0
0
0
0
0
0
0
0
0
E
#11
:n
PRICE_IN
:d
$
:u
$
:v
12000
12000
15000
15000
15000
15000
15000
9995
72500
11500
E
#12
:n
DOWNPAY_IN
:d
$
:u
$
:v
2000






2000
E
#13
:n
DP%_IN
:d
%
:u
1
:v

.15


.15

.25

.1
.1
E
#14
:n
LOAN_IN
:d
$
:u
$
:v


13000
13000
E
#15
:n
TERM_IN
:d
yr
:u
mo
:v
48
48

60
60
48
48

360
48
E
#16
:n
RATE_IN
:d
%/yr
:u
1/mo
:v
.00833333333333333
.00833333333333333
.00833333333333333


.00583333333333333
.00583333333333333
.00325
.00908333333333333
.0025
E
#17
:n
PAYMENT_IN
:d
$/mo
:u
$/mo
:v


250
250
250
250

193.06
E
#18
:n
MCA_TABLE
:v
'PRICE
'DOWNPAY
'DP%
'LOAN
'TERM
'RATE
'PAYMENT
'DUMMY
'TOTPAY
'TOTINT
E
#19
:n
MCA_IN
:v
'PRICE_IN
'DOWNPAY_IN
'DP%_IN
'LOAN_IN
'TERM_IN
'RATE_IN
'PAYMENT_IN
'DUMMY_IN
E
#20
:n
DUMMY_IN
:c
All elements are 0, must be longest list.
:v
0
0
0
0
0
0
0
0
0
0
E
#21
:n
Price_In
:v
E
=f
#1
:n
ASSIGN
:c
Assignment function for Multicase Analysis
:t
Rule
:a
PRICE,DOWNPAY,DP%,LOAN,TERM,RATE,PAYMENT
#2
:n
TABLECOPY
:c
Copies MCA_In into MCA_Table
:t
Procedure
#3
:n
COPY
:c
"Inactive function"--used with / E E
:t
Rule
:v
st
#4
:n
copy
:c
Same function as  COPY
:t
Rule
:v
st
#1
:n
ASSIGN
:z
" This function reads, from each list in MCA_Table, the current element
" (if it exists) and passes it back to the Rule Sheet.  This is simply done
" here without having to refer to a procedure function since block solving
" is being used and elt() will pick out the proper number for the case.

PRICE = elt('PRICE,elt(),0/0)
DOWNPAY = elt('DOWNPAY,elt(),0/0)
DP%  = elt('DP%,elt(),0/0)
LOAN = elt('LOAN,elt(),0/0)
TERM = elt('TERM,elt(),0/0)
RATE = elt('RATE,elt(),0/0)
PAYMENT = elt('PAYMENT,elt(),0/0)
/E
E
#2
:n
TABLECOPY
:z
for i=1 to length('MCA_TABLE)
  call blank('MCA_TABLE[i])
next i
for i=1 to length('MCA_IN)
  call listcopy('MCA_IN[i],'MCA_TABLE[i])
next i
/E
E
#3
:n
COPY
:z
" This function is not used during block solving.  It is called via the
" keystroke / E E COPY().  It then calls  TABLECOPY , which does the actual
" copying.  Finally, it returns a message heralding completion through the
" result variable  st .

call TABLECOPY()
st='Copying_Done
/E
E
#4
:n
copy
:z
" This function is not used during block solving.  It is called via the
" keystroke / E E copy().  It then calls  TABLECOPY , which does the actual
" copying.  Finally, it returns a message heralding completion through the
" result variable  st .

call TABLECOPY()
st='Copying_Done
/E
E
=r
#1
:r
"          ***  L o a n   M o d e l ,  Multicase Analysis  ***
:s
C
#3
:r
CALL ASSIGN(PRICE,DOWNPAY,DP%,LOAN,TERM,RATE,PAYMENT)
#5
:r
DOWNPAY = PRICE * DP%
#6
:r
LOAN = PRICE - DOWNPAY
#7
:r
PAYMENT = LOAN * RATE/(1-(1+RATE)^-TERM)
#8
:r
TOTPAY  = PAYMENT * TERM
#9
:r
TOTINT  = TOTPAY - LOAN
=p
=t
#1
:n
MCA_Input
:s
Screen
:v
Horizontal
:f
1
:r
""
:c
""
:t
"Input Table for MCA Loan Model"
:u
#1
:l
PRICE_IN
:n
Currency
:w
10
:h
""
#2
:l
DOWNPAY_IN
:n
Currency
:w
10
:h
""
#3
:l
DP%_IN
:n
Currency
:w
10
:h
""
#4
:l
LOAN_IN
:n
Currency
:w
10
:h
""
#5
:l
TERM_IN
:n
Currency
:w
10
:h
""
#6
:l
RATE_IN
:n
Currency
:w
10
:h
""
#7
:l
PAYMENT_IN
:n
Currency
:w
10
:h
""
E
#2
:n
MCA_Table
:s
Screen
:v
Horizontal
:f
1
:r
""
:c
""
:t
"Loan Model - Multi-Case Analysis"
:u
#1
:l
PRICE
:n
Currency
:w
10
:h
""
#2
:l
DOWNPAY
:n
Currency
:w
10
:h
""
#3
:l
DP%
:n
Currency
:w
10
:h
""
#4
:l
LOAN
:n
Currency
:w
10
:h
""
#5
:l
TERM
:n
Currency
:w
10
:h
""
#6
:l
RATE
:n
Currency
:w
10
:h
""
#7
:l
PAYMENT
:n
Currency
:w
10
:h
""
#8
:l
TOTPAY
:n
Currency
:w
10
:h
""
#9
:l
TOTINT
:n
Currency
:w
10
:h
""
E
#3
:s
Screen
:v
Vertical
:f
1
:r
""
:c
""
:t
""
:u
E
=n
#1
:n
Currency
:d
15
:f
2
:^
Decimal
:e
"."
:m
""
:c
Financial Notation
:p
Zero
:j
Right
:s
- Only
:q
0
:x
0
:l
""
:t
""
:v
"0.00"
#2
:n
Dumb
:d
15
:f

:^
Either Scientific or Decimal
:e
"."
:m
""
:c
Format to make dummy look better
:p
None
:j
Right
:s
- Only
:q
0
:x
0
:l
""
:t
""
:v
"0"
=g
#1
:c
.000001
:i
10
:v
Yes
:l
60
:f
66
:m
0
:w
80
:b
Yes
:a
Yes
:r
No
:h
Yes
:t
1
:n
Yes
:d
lpt1
%Tt,f,0,0,0,1,0>t,0,0,0,8,0>f,0,1,1,1,0
%Ot,f,1,0,0,1,0>t,0,0,0,8,0>f,8,1,1,1,0
